FROM ollama/ollama:0.6.1

LABEL authors="kennylee"

RUN sed -i 's|http://.*archive.ubuntu.com|http://mirrors.aliyun.com|g' /etc/apt/sources.list && \
     sed -i 's|http://.*security.ubuntu.com|http://mirrors.aliyun.com|g' /etc/apt/sources.list && \
     sed -i 's|http://ports.ubuntu.com|http://mirrors.aliyun.com|g' /etc/apt/sources.list

ENV LANG="zh_CN.UTF-8" \
    LANGUAGE="zh_CN:zh:en_US:en" \
    LC_ALL="zh_CN.UTF-8" \
    TZ="Asia/Shanghai" \
    DEBIAN_FRONTEND="noninteractive" \
    TERM="xterm"

# Install.
RUN \
  apt-get update && \
  apt-get -y upgrade && \
  apt-get install -y curl git unzip vim gnupg wget iputils-ping && \
  apt-get install -y language-pack-zh-hans && \
  apt-get install -y dialog apt-utils tzdata && \
  rm -rf /var/lib/apt/lists/*

RUN locale

RUN echo $TZ  > /etc/timezone && \
        dpkg-reconfigure --frontend noninteractive tzdata

EXPOSE 11434